cmake_minimum_required(VERSION 3.16)
project(SimpleImplWithOnnx)

# linux
#set(OpenCV_DIR /media/tacom/fd1834d9-91ec-45dc-908b-eed1b326caaa/Envs/OpenCV460/Binary/lib/cmake/opencv4)
#set(xtensor_DIR /media/tacom/fd1834d9-91ec-45dc-908b-eed1b326caaa/Envs/xtensor/xtensorBin/share/cmake/xtensor)
#set(onnxruntime_DIR /media/tacom/fd1834d9-91ec-45dc-908b-eed1b326caaa/Envs/onnxruntime-1.20.1-cpu/lib/cmake/onnxruntime)

# windows
set(OpenCV_DIR D:/Development/Envs/OpenCV460/Binary/x64/vc16/lib)
set(xtensor_DIR D:/Development/Envs/xtensorlib/xtensorBin/share/cmake/xtensor)
set(xtl_DIR D:/Development/Envs/xtensorlib/xtlBin/share/cmake/xtl)
set(onnxruntime_DIR D:/Development/Envs/onnxruntime-win-x64-1.20.1)
set(onnxruntime_INCLUDE ${onnxruntime_DIR}/include)
set(onnxruntime_LIBS
    ${onnxruntime_DIR}/lib/onnxruntime.lib
    ${onnxruntime_DIR}/lib/onnxruntime_providers_shared.lib
)
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")

find_package(OpenCV REQUIRED)
find_package(xtensor REQUIRED)
#find_package(onnxruntime REQUIRED)

add_executable(${PROJECT_NAME}
        main.cpp
)

target_link_libraries(${PROJECT_NAME}
        ${OpenCV_LIBS}
        xtensor
#        onnxruntime::onnxruntime
        ${onnxruntime_LIBS}
)
target_include_directories(${PROJECT_NAME}
    PUBLIC
        ${OpenCV_INCLUDE_DIRS}
        ${onnxruntime_INCLUDE}
)
